<?PHP printdisplayheader('Media/Images','Photos for Website/Gallery/Etc');?>

<?PHP
$order[0]='content_modified';
$order[1]='DESC';
$limit[0]=0;	
$limit[1]=10;
global $conf;
$where[0][0]='content_type';
$where[0][1]=6;
$where[0][2]='=';
$dataz = getlistfiltered2('content',NULL,NULL,$where,$order,$limit,FALSE);

$headers[]='Path';
$headers[]='File Name';
$headers[]='Thumb';




$headers[]='Action';
$show[]='code';
$show[]='content_title';
$show[]='content_thumb';




$links['View']='page_data_media.php?cmd=edit&content_id=';

$ajax['Delete']='a/delete_image.php';

if(!empty($dataz))
{
	foreach($dataz as $x)
	{
		$content_thumb=$conf->thumb_dir.$x['content_thumb'];
		$content_code=$conf->photo_dir.$x['content_file'];
		$content_code= strstr($content_code, 'media');
		//echo $content_thumb;
		$x['content_thumb']="<img src='".$content_thumb."' name='".$x['content_title']."'>";
		$x['code']="<code>".$content_code."</code>";
		$arr_media[]=$x;	
	}
	p_table($headers,$arr_media,$links,"class='itable'",$show,NULL);
}

?>
<?PHP printdisplayfooter('Add Photos','page_data_media.php?cmd=add','Mass Add','page_data_media_multiple.php?cmd=add','View All','page_media.php');?>